﻿IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[IMStatus]'))
DROP TABLE [dbo].[IMStatus]
GO

CREATE TABLE [dbo].[IMStatus](
	[Key] [uniqueidentifier] NOT NULL DEFAULT NEWID(),
	[DomainScopeKey] [uniqueidentifier] NOT NULL,
	[DomainScopeUserKey] [uniqueidentifier],
	[Status] [int] NOT NULL,
	[StartStamp] [datetime] NOT NULL,
	[EndStamp] [datetime] NOT NULL,
 CONSTRAINT [PK_IMStatus] PRIMARY KEY CLUSTERED 
([Key] ASC)ON [PRIMARY])

GO